package com.ctshk.rpc.goods.mapper;

import java.util.List;

import com.ctshk.rpc.goods.dto.ShoppingShopKeyWordsDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.ctshk.rpc.goods.base.CustomBaseMapper;
import com.ctshk.rpc.goods.entity.ShoppingShopKeyWord;

/**
 * <p>
 * 商城关键词 Mapper 接口
 * </p>
 *
 * @author 姜斌文
 * @since 2021-04-06
 */
public interface ShoppingShopKeyWordMapper extends CustomBaseMapper<ShoppingShopKeyWord> {

    /**
     * 根据shopId查询
     * @param shopId
     * @return List<ShoppingShopKeyWord>
     */
    @Select("select t.id  FROM t_shopping_shop_key_word t WHERE t.is_deleted = 0 and t.shop_id = #{shopId}")
    List<ShoppingShopKeyWord> selectChildren(@Param("shopId") long shopId);

    @Select("SELECT t.id, t.words, t.type FROM t_shopping_shop_key_word t WHERE t.is_deleted = 0 and t.shop_id = #{shopId}")
    List<ShoppingShopKeyWord> findShoppingShopKeyWordsListByShopId(@Param("shopId") Long shopId);
}
